package com.arnold.www.singleton;

/**
 * @ClassName singleton_hungry
 * @Description: 饿汉式单例模式不存在线程安全性问题
 * @Author Arnold
 * @Date 2020/4/11
 * @Version V2.0
 **/
public class Singleton_hungry {
    //私有化构造方法
    private Singleton_hungry(){}

    private static Singleton_hungry singletonHungry = new Singleton_hungry();

    //对外暴露获取实例方法
    public static Singleton_hungry getInstance(){
        return singletonHungry;
    }
}